<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body></body>
  <script>
    // let str = new String("hdcms.com");
    // console.log(str);
    // let str = "houdunren.com";
    // console.log(str.substr(0, 1));
    // let func = new Function("title", "console.log(title)");
    // func("后盾人");
    // function hd(title) {
    //   console.log(title);
    // }
    // hd("houdunren");
    // hd("houdunren");
    // hd("houdunren");
    // hd("houdunren");
    // hd("houdunren");
    // let cms = function(title) {
    //   console.log(title);
    // };
    // cms("后盾人");

    let user = {
      name: null,
      setUsername(name) {
        this.name = name;
      },
      getUsername() {
        return this.name;
      }
    };
    user.setUsername("后盾人");
    console.log(user.getUsername());
  </script>
</html>
